/*
package com.lsyw.intergrate.common.util;

import com.alibaba.fastjson.JSONObject;
import com.hikvision.artemis.sdk.ArtemisHttpUtil;
import com.hikvision.artemis.sdk.config.ArtemisConfig;
import com.lsyw.intergrate.entity.Equipment;
import org.apache.commons.codec.binary.Base64;
import org.apache.logging.log4j.util.Base64Util;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


@Component
public class ArtemisPostTestUtil {


    */
/**
     * 请根据自己的appKey和appSecret更换static静态块中的三个参数. [1 host]
     * 如果你选择的是和现场环境对接,host要修改为现场环境的ip,https端口默认为443，http端口默认为80.例如10.33.25.22:443 或者10.33.25.22:80
     * appKey和appSecret请按照或得到的appKey和appSecret更改.
     * TODO 调用前先要清楚接口传入的是什么，是传入json就用doPostStringArtemis方法，下载图片doPostStringImgArtemis方法
     *//*

    */
/**
     * 能力开放平台的网站路径
     * TODO 路径不用修改，就是/artemis
     *//*

    private static final String ARTEMIS_PATH = "/artemis";


    */
/**
     * 分页获取监控点资源
     *
     * @return
     *//*

    public static String GetCameras(int pageNo, int pageSize) throws Exception {
        ArtemisConfig artemisConfig = new ArtemisConfig();
        */
/**
         * STEP1：设置平台参数，根据实际情况,设置host appkey appsecret 三个参数.
         *//*

        artemisConfig.setHost("50.64.103.27");// 代理API网关nginx服务器ip端口
        artemisConfig.setAppKey("23273471"); // 秘钥appkey
        artemisConfig.setAppSecret("6BMlFNJiTW3mKJ1po2np"); // 秘钥appSecret

        */
/**
         * STEP2：设置OpenAPI接口的上下文
         *//*

        final String ARTEMIS_PATH = "/artemis";

        */
/**
         * STEP3：设置接口的URI地址
         *//*

        final String previewURLsApi = ARTEMIS_PATH + "/api/resource/v1/cameras";
        Map<String, String> path = new HashMap<String, String>(2) {
            {
                put("https://", previewURLsApi);//根据现场环境部署确认是http还是https
            }
        };

        */
/**
         * STEP4：设置参数提交方式
         *//*

        String contentType = "application/json";

        */
/**
         * STEP5：组装请求参数
         *//*

        JSONObject jsonBody = new JSONObject();
        jsonBody.put("pageNo", pageNo);
        jsonBody.put("pageSize", pageSize);
        String body = jsonBody.toJSONString();
        */
/**
         * STEP6：调用接口
         *//*

        String result = ArtemisHttpUtil.doPostStringArtemis(artemisConfig, path, body, null, null, contentType);// post请求application/json类型参数
//        JSONObject json=JSONObject.parseObject(result);
//        JSONObject data=json.getJSONObject("data");
        return result;
    }

    */
/**
     * 过车记录
     *
     * @return
     *//*

    public static String carAccess(String kk,int pageNo, int pageSize, String beginTime, String endTime) throws Exception {
        ArtemisConfig artemisConfig = new ArtemisConfig();
        */
/**
         * STEP1：设置平台参数，根据实际情况,设置host appkey appsecret 三个参数.
         *//*

        artemisConfig.setHost("50.64.103.27");// 代理API网关nginx服务器ip端口
        artemisConfig.setAppKey("23273471"); // 秘钥appkey
        artemisConfig.setAppSecret("6BMlFNJiTW3mKJ1po2np"); // 秘钥appSecret

        */
/**
         * STEP2：设置OpenAPI接口的上下文
         *//*

        final String ARTEMIS_PATH = "/artemis";

        */
/**
         * STEP3：设置接口的URI地址
         *//*

        final String previewURLsApi = ARTEMIS_PATH + "/api/aiapplication/v1/vehicle/queryVehiclesByAttrWithPage";
        Map<String, String> path = new HashMap<String, String>(2) {
            {
                put("https://", previewURLsApi);//根据现场环境部署确认是http还是https
            }
        };

        */
/**
         * STEP4：设置参数提交方式
         *//*

        String contentType = "application/json";

        */
/**
         * STEP5：组装请求参数
         *//*

        JSONObject jsonBody = new JSONObject();
        jsonBody.put("pageNo", pageNo);
        jsonBody.put("pageSize", pageSize);
        jsonBody.put("beginTime", beginTime);
        jsonBody.put("endTime", endTime);
        jsonBody.put("crossingIndexCodes", kk);
//        "5fa24715fd634af1865ad07cf521a6cc"
        String body = jsonBody.toJSONString();
        */
/**
         * STEP6：调用接口
         *//*

        String result = ArtemisHttpUtil.doPostStringArtemis(artemisConfig, path, body, null, null, contentType);// post请求application/json类型参数
//        JSONObject json=JSONObject.parseObject(result);
//        JSONObject data=json.getJSONObject("data");
        return result;
    }


    */
/**
     * 分页获取监控点资源
     *
     * @return
     *//*

    public static String kkxx(int pageNo, int pageSize) throws Exception {
        ArtemisConfig artemisConfig = new ArtemisConfig();
        */
/**
         * STEP1：设置平台参数，根据实际情况,设置host appkey appsecret 三个参数.
         *//*

        artemisConfig.setHost("50.64.103.27");// 代理API网关nginx服务器ip端口
        artemisConfig.setAppKey("23273471"); // 秘钥appkey
        artemisConfig.setAppSecret("6BMlFNJiTW3mKJ1po2np"); // 秘钥appSecret

        */
/**
         * STEP2：设置OpenAPI接口的上下文
         *//*

        final String ARTEMIS_PATH = "/artemis";

        */
/**
         * STEP3：设置接口的URI地址
         *//*

        final String previewURLsApi = ARTEMIS_PATH + "/api/resource/v1/crossing/getCrossingsWithPage";
        Map<String, String> path = new HashMap<String, String>(2) {
            {
                put("https://", previewURLsApi);//根据现场环境部署确认是http还是https
            }
        };

        */
/**
         * STEP4：设置参数提交方式
         *//*

        String contentType = "application/json";

        */
/**
         * STEP5：组装请求参数
         *//*

        JSONObject jsonBody = new JSONObject();
        jsonBody.put("pageNo", pageNo);
        jsonBody.put("pageSize", pageSize);
        String body = jsonBody.toJSONString();
        */
/**
         * STEP6：调用接口
         *//*

        String result = ArtemisHttpUtil.doPostStringArtemis(artemisConfig, path, body, null, null, contentType);// post请求application/json类型参数
        return result;
    }


    */
/**
     * 人脸轨迹
     *
     * @return
     *//*

    public static String faceTrack(String camera, int pageNo, int pageSize, String beginTime, String endTime, String certNo, String name) throws Exception {
        ArtemisConfig artemisConfig = new ArtemisConfig();
        */
/**
         * STEP1：设置平台参数，根据实际情况,设置host appkey appsecret 三个参数.
         *//*

        artemisConfig.setHost("50.64.103.27");// 代理API网关nginx服务器ip端口
        artemisConfig.setAppKey("23273471"); // 秘钥appkey
        artemisConfig.setAppSecret("6BMlFNJiTW3mKJ1po2np"); // 秘钥appSecret

        */
/**
         * STEP2：设置OpenAPI接口的上下文
         *//*

        final String ARTEMIS_PATH = "/artemis";

        */
/**
         * STEP3：设置接口的URI地址
         *//*

        final String previewURLsApi = ARTEMIS_PATH + "/api/aiapplication/v1/face/queryDataByAttrWithPage";
        Map<String, String> path = new HashMap<String, String>(2) {
            {
                put("https://", previewURLsApi);//根据现场环境部署确认是http还是https
            }
        };

        */
/**
         * STEP4：设置参数提交方式
         *//*

        String contentType = "application/json";

        */
/**
         * STEP5：组装请求参数
         *   "pageNo": 1,
         *   "pageSize": 20,
         *   "sort": "captureTime",
         *   "order": "desc",
         *   "cameraIndexCodes": "-1",
         *   "beginTime": "2023-03-24T00:00:00.000+08:00",
         *   "endTime": "2023-03-24T23:59:59.000+08:00",
         *   "certificateNumber": "320682199512017950"
         *//*


        JSONObject jsonBody = new JSONObject();
        jsonBody.put("pageNo", pageNo);
        jsonBody.put("pageSize", pageSize);
        jsonBody.put("sort", "captureTime");
        jsonBody.put("order", "desc");
        jsonBody.put("cameraIndexCodes", camera);
        jsonBody.put("beginTime", beginTime);
        jsonBody.put("endTime", endTime);
        jsonBody.put("certificateNumber", certNo);
        jsonBody.put("name", name);
        String body = jsonBody.toJSONString();
        */
/**
         * STEP6：调用接口
         *//*

        String result = ArtemisHttpUtil.doPostStringArtemis(artemisConfig, path, body, null, null, contentType);// post请求application/json类型参数
        return result;
    }

    */
/**
     * 人脸轨迹
     *
     * @return
     *//*

    public static String carTrack(String kk, int pageNo, int pageSize, String beginTime, String endTime, String plateNo) throws Exception {
        ArtemisConfig artemisConfig = new ArtemisConfig();
        */
/**
         * STEP1：设置平台参数，根据实际情况,设置host appkey appsecret 三个参数.
         *//*

        artemisConfig.setHost("50.64.103.27");// 代理API网关nginx服务器ip端口
        artemisConfig.setAppKey("23273471"); // 秘钥appkey
        artemisConfig.setAppSecret("6BMlFNJiTW3mKJ1po2np"); // 秘钥appSecret

        */
/**
         * STEP2：设置OpenAPI接口的上下文
         *//*

        final String ARTEMIS_PATH = "/artemis";

        */
/**
         * STEP3：设置接口的URI地址
         *//*

        final String previewURLsApi = ARTEMIS_PATH + "/api/aiapplication/v1/vehicle/queryTracksByVehicleWithPage";
        Map<String, String> path = new HashMap<String, String>(2) {
            {
                put("https://", previewURLsApi);//根据现场环境部署确认是http还是https
            }
        };

        */
/**
         * STEP4：设置参数提交方式
         *//*

        String contentType = "application/json";

        */
/**
         * STEP5：组装请求参数
         *   "pageNo": 1,
         *  "pageSize": 20,
         *  "beginTime": "2018-05-09T00:00:00.000+08:00",
         *   "endTime": "2018-06-22T00:00:00.000+08:00",
         *  "plateNo": "浙A5867F",
         *   "plateColor": "blue",
         *  "vehicleType": "vehicle",
         *  "vehicleColor": "yellow",
         *  "crossingIndexCodes": "41,281",
         *  "unitIndexCodes": "1201,1023"
         *//*


        JSONObject jsonBody = new JSONObject();
        jsonBody.put("pageNo", pageNo);
        jsonBody.put("pageSize", pageSize);
        jsonBody.put("plateNo", plateNo);
        jsonBody.put("crossingIndexCodes", kk);
        jsonBody.put("endTime", endTime);
        jsonBody.put("beginTime", beginTime);
        String body = jsonBody.toJSONString();
        */
/**
         * STEP6：调用接口
         *//*

        String result = ArtemisHttpUtil.doPostStringArtemis(artemisConfig, path, body, null, null, contentType);// post请求application/json类型参数
        return result;
    }



    public static void main(String[] args) throws Exception {
        Number[] a = new Number[1];
        a[0] = 192515;
//		a[1]=131586;
        Number[] b = new Number[1];
        b[0] = 3;
//		b[1]=3;
        System.out.println(Base64Util.encode("http://32.50.126.42:6120/pic?=d31ib984i3a0=o4f-bp6e18-1idfc07aa9da9bi6b8*=2d2s8*=6dpi*=1d7i5t1pe*m6i19=9172677*75z0d-s=8ae20*l18aod5-27115cd1"));

//        System.out.println(GetCameras(1, 10));
//		System.out.println(crossRecords(1,10));
//		System.out.println(crossRecords1(1,10));
//		System.out.println(faceCapture(1,10,"2020-11-17T23:14:15.927Z","2020-12-08T23:19:15.927Z"));
//		System.out.println(DelAlarmMessageSubscription(a));
//		System.out.println(AlarmMessageSubscription(a,"http://61.160.81.178:23400/zg/eventRcv",2,b));
//		System.out.println(GetAlarmMessageList("2020-11-17T23:14:15.927Z","2020-11-17T23:19:15.927Z",1,10));
//		Number[] c=new Number[1];
//		c[0]=131586;
//		GetCameraPlayBackURLs("hls","81c1f34210b647e099a9886adbb0f63c",stringToIos("2020-12-15 00:00:00"),stringToIos("2020-12-15 00:30:00"));
//		GetCameraPlayBackURLs("rtmp","81c1f34210b647e099a9886adbb0f63c",stringToIos("2020-12-15 00:00:00"),stringToIos("2020-12-15 01:00:00"));
//		GetCameraPlayBackURLs("rtsp","81c1f34210b647e099a9886adbb0f63c",stringToIos("2020-12-14 05:00:00"),stringToIos("2020-12-14 06:00:00"));
//		GetCameraPlayBackURLs("hik","81c1f34210b647e099a9886adbb0f63c",stringToIos("2020-12-15 00:00:00"),stringToIos("2020-12-15 01:00:00"));


//		c[0]=889196545;
//		c[2]=327681;
//		System.out.println(DelAlar
//		tring.valueOf(jsonBody.get("data"))).get("url"));
//			System.out.println(hls);
//
//		}


    }
}
*/
